﻿
@{
    ViewBag.Title = "Registrar Consumo de Agua";
    if (ViewBag.permiso == 3 || ViewBag.permiso == 0)
    {

        Layout = "~/Views/Shared/_AdministradorGeneralLayout.cshtml";

    }

    if (ViewBag.permiso == 2)
    {

        Layout = "~/Views/Shared/_AdministradorEdificiosLayout.cshtml";

    }
}

<script>
    $(function () {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'dd/mm/yy'
        });
    });

    $(function () {
        $("#datepicker1").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'dd/mm/yy'
        });
    });


</script>
<script>
	// increase the default animation speed to exaggerate the effect
	//$.fx.speeds._default = 4000;
	$(function () {
		$("#dialog").dialog({
			autoOpen: false,
			resizable: false,
			height: 240,
			modal: true,
			buttons: {
				"Si": function () {
					$("#form_1").submit();
					$(this).dialog('close');
					
				},

				"No": function () {
					$(this).dialog("close");
				}
			}
		});

		$("#open").click(function () {
			$("#dialog").dialog("open");
			return false;
		});


	});
</script>
<script>
	$(document).ready(function () {
		$(":file").css("background-color", "lightgray");
		$(":file").css("height", "25px");
		$(":file").css("margin-left", "-7px");
	});
</script>
    <!-- content -->
    <div class="body2">
        <div class="main">
            <section id="content">
                <div class="wrapper">
                    <!--Formulario-->
                    <article class="col0">
						<nav class="urbangreymenu">
							<h3 class="headerbar">Gastos Comunes</h3>
							<ul id="subMenu">
								<li>
									<h5>@Html.ActionLink("Agregar Gasto Común", "Registrar")</h5>
								</li>
                                <li>
									<h5>@Html.ActionLink("Visualizar Gastos Comumnes", "Buscar")</h5>
								</li>
                                <li>
									<h5>@Html.ActionLink("Registrar Consumo de Agua", "RegistrarAgua")</h5>
								</li>
							</ul>
						</nav>
					</article>

                    <article class="col1" style="width: 500px">

                        <form id="form_1" method="post" style="height: 100%">
                            <div class="pad1">
                                <h3>Porratero del edificio @ViewBag.edif.prNombre al @ViewBag.mesanho</h3>
                                <!--edificio -->
                                
                                <br><br >

                                <table border ="0" id="indice" >
                                             <tr>
                                                    <th >Departamento</th>
                                                    <th >Consumo</th>
                                                    <th >Costo Consumo</th>
                                             </tr>
                                                @foreach (var conto in ViewBag.listadif)
                                                {
                                                  <tr>
                                                   <td> @conto.prDepartamento.prNumeroDepartamento</td>
                                                    <td>@conto.prMarca</td>
                                                    @if (@conto.prMonto >= 1000)
                                                    {
                                                    <td>S/. @String.Format("{0:0,000.00}", @conto.prMonto)</td>
                                                    }
                                                    else
                                                    {
                                                     <td>S/. @String.Format("{0:0.00}", @conto.prMonto)</td>
                                                    }                                                           
                                                  </tr>
                                                }
										</table>   
                                                <input id="monto" type="hidden" name="monto" value="@ViewBag.monto" />
                                                <input id="FecEmision" type="hidden" name="FecEmision" value="@ViewBag.FecEmision" />
                                                <input id="FecVencimiento" type="hidden" name="FecVencimiento" value="@ViewBag.FecVencimiento" />
                                                <input id="idedificio" type="hidden" name="idedificio" value="@ViewBag.edif.prIdEdificio" />
                                <!--tipo de servicio -->
                                

                             


                                <span>&nbsp;</span>
										        <a href="#"  class="button" onClick="document.getElementById('form_1').submit()">Registrar</a>
                                                <a href="#"  class="button" onClick="document.getElementById('form_1').reset()">Limpiar</a>
                                                <a href="/GastosComunes/Index"  class="button" onClick="document.getElementById('form_1').cancel()">Cancelar</a>
                                <br>
                                <br>
                            </div>
                        </form>
                    </article>

                </div>
            </section>
        </div>
    </div>
    <!-- / content -->

    <script type="text/javascript"> Cufon.now(); </script>

</body>

